# set project's name
PROJECT( MATCHING  )
  
ADD_LIBRARY(common common/common.cpp data/dataset.cpp)
  
#============= INCLUDE & LIBS ===============
INCLUDE_DIRECTORIES( ${Boost_INCLUDE_DIR} ${CMAKE_BINARY_DIR} )
#LINK_DIRECTORIES( ${Boost_LIBRARY_DIRS} )

SET (LIBS ${QT_LIBRARIES} ${Boost_LIBRARIES}) 
IF(${UNIX})
	SET(LIBS ${LIBS} lapack)
	message(STATUS "UNIX system, add lapack")
ENDIF(${UNIX})
 
#================= SHOW ===================== 
SET( MATCHING_SHOW_SRCS
	show_main.cpp
	show_mainwindow.cpp
	viewer/viewer.cpp
	viewer/kdtree_viewer.cpp
)
SET( MATCHING_SHOW_MOC_HDRS
	show_mainwindow.h
)
SET( MATCHING_SHOW_UIS )
SET( MATCHING_SHOW_RCS )
  
QT4_ADD_RESOURCES( MATCHING_SHOW_RC_SRCS ${MATCHING_SHOW_RCS} )
QT4_WRAP_UI( MATCHING_SHOW_UI_HDRS ${MATCHING_SHOW_UIS} )
QT4_WRAP_CPP( MATCHING_SHOW_MOC_SRCS ${MATCHING_SHOW_MOC_HDRS} )
  
ADD_EXECUTABLE( show ${MATCHING_SHOW_SRCS} ${MATCHING_SHOW_MOC_SRCS} ${MATCHING_SHOW_RC_SRCS} ${MATCHING_SHOW_UI_HDRS} )
TARGET_LINK_LIBRARIES( show ${LIBS} common)

#================ GENERATE ==================
SET( MATCHING_GENERATE_SRCS
	generate_main.cpp
)
ADD_EXECUTABLE( generate ${MATCHING_GENERATE_SRCS} )
TARGET_LINK_LIBRARIES( generate ${LIBS} common)

#================ MATCHING ==================
SET( MATCHING_SRCS
	matching_main.cpp
)
ADD_EXECUTABLE( matching ${MATCHING_SRCS} )
TARGET_LINK_LIBRARIES( matching ${LIBS} common)
